{"ast":null,"code":"import _defineProperty from \"/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport _slicedToArray from \"/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";\nimport HolderOutlined from \"@ant-design/icons/es/icons/HolderOutlined\";\nimport classNames from 'classnames';\nimport RcTree from 'rc-tree';\nimport * as React from 'react';\nimport { ConfigContext } from '../config-provider';\nimport initCollapseMotion from '../_util/motion';\nimport dropIndicatorRender from './utils/dropIndicator';\nimport renderSwitcherIcon from './utils/iconUtil';\nimport useStyle from './style';\nvar Tree = /*#__PURE__*/React.forwardRef(function (props, ref) {\n  var _classNames;\n  var _React$useContext = React.useContext(ConfigContext),\n    getPrefixCls = _React$useContext.getPrefixCls,\n    direction = _React$useContext.direction,\n    virtual = _React$useContext.virtual;\n  var customizePrefixCls = props.prefixCls,\n    className = props.className,\n    _props$showIcon = props.showIcon,\n    showIcon = _props$showIcon === void 0 ? false : _props$showIcon,\n    showLine = props.showLine,\n    _switcherIcon = props.switcherIcon,\n    _props$blockNode = props.blockNode,\n    blockNode = _props$blockNode === void 0 ? false : _props$blockNode,\n    children = props.children,\n    _props$checkable = props.checkable,\n    checkable = _props$checkable === void 0 ? false : _props$checkable,\n    _props$selectable = props.selectable,\n    selectable = _props$selectable === void 0 ? true : _props$selectable,\n    draggable = props.draggable,\n    customMotion = props.motion;\n  var prefixCls = getPrefixCls('tree', customizePrefixCls);\n  var rootPrefixCls = getPrefixCls();\n  var motion = customMotion !== null && customMotion !== void 0 ? customMotion : Object.assign(Object.assign({}, initCollapseMotion(rootPrefixCls)), {\n    motionAppear: false\n  });\n  var newProps = Object.assign(Object.assign({}, props), {\n    checkable: checkable,\n    selectable: selectable,\n    showIcon: showIcon,\n    motion: motion,\n    blockNode: blockNode,\n    showLine: Boolean(showLine),\n    dropIndicatorRender: dropIndicatorRender\n  });\n  var _useStyle = useStyle(prefixCls),\n    _useStyle2 = _slicedToArray(_useStyle, 2),\n    wrapSSR = _useStyle2[0],\n    hashId = _useStyle2[1];\n  var draggableConfig = React.useMemo(function () {\n    if (!draggable) {\n      return false;\n    }\n    var mergedDraggable = {};\n    switch (typeof draggable) {\n      case 'function':\n        mergedDraggable.nodeDraggable = draggable;\n        break;\n      case 'object':\n        mergedDraggable = Object.assign({}, draggable);\n        break;\n      default:\n        break;\n      // Do nothing\n    }\n\n    if (mergedDraggable.icon !== false) {\n      mergedDraggable.icon = mergedDraggable.icon || /*#__PURE__*/React.createElement(HolderOutlined, null);\n    }\n    return mergedDraggable;\n  }, [draggable]);\n  return wrapSSR( /*#__PURE__*/React.createElement(RcTree, Object.assign({\n    itemHeight: 20,\n    ref: ref,\n    virtual: virtual\n  }, newProps, {\n    prefixCls: prefixCls,\n    className: classNames((_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-icon-hide\"), !showIcon), _defineProperty(_classNames, \"\".concat(prefixCls, \"-block-node\"), blockNode), _defineProperty(_classNames, \"\".concat(prefixCls, \"-unselectable\"), !selectable), _defineProperty(_classNames, \"\".concat(prefixCls, \"-rtl\"), direction === 'rtl'), _classNames), className, hashId),\n    direction: direction,\n    checkable: checkable ? /*#__PURE__*/React.createElement(\"span\", {\n      className: \"\".concat(prefixCls, \"-checkbox-inner\")\n    }) : checkable,\n    selectable: selectable,\n    switcherIcon: function switcherIcon(nodeProps) {\n      return renderSwitcherIcon(prefixCls, _switcherIcon, showLine, nodeProps);\n    },\n    draggable: draggableConfig\n  }), children));\n});\nexport default Tree;","map":{"version":3,"names":["HolderOutlined","classNames","RcTree","React","ConfigContext","initCollapseMotion","dropIndicatorRender","renderSwitcherIcon","useStyle","Tree","forwardRef","props","ref","useContext","getPrefixCls","direction","virtual","customizePrefixCls","prefixCls","className","showIcon","showLine","switcherIcon","blockNode","children","checkable","selectable","draggable","customMotion","motion","rootPrefixCls","Object","assign","motionAppear","newProps","Boolean","wrapSSR","hashId","draggableConfig","useMemo","mergedDraggable","nodeDraggable","icon","createElement","itemHeight","nodeProps"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/antd/es/tree/Tree.js"],"sourcesContent":["import HolderOutlined from \"@ant-design/icons/es/icons/HolderOutlined\";\nimport classNames from 'classnames';\nimport RcTree from 'rc-tree';\nimport * as React from 'react';\nimport { ConfigContext } from '../config-provider';\nimport initCollapseMotion from '../_util/motion';\nimport dropIndicatorRender from './utils/dropIndicator';\nimport renderSwitcherIcon from './utils/iconUtil';\nimport useStyle from './style';\nconst Tree = /*#__PURE__*/React.forwardRef((props, ref) => {\n  const {\n    getPrefixCls,\n    direction,\n    virtual\n  } = React.useContext(ConfigContext);\n  const {\n    prefixCls: customizePrefixCls,\n    className,\n    showIcon = false,\n    showLine,\n    switcherIcon,\n    blockNode = false,\n    children,\n    checkable = false,\n    selectable = true,\n    draggable,\n    motion: customMotion\n  } = props;\n  const prefixCls = getPrefixCls('tree', customizePrefixCls);\n  const rootPrefixCls = getPrefixCls();\n  const motion = customMotion !== null && customMotion !== void 0 ? customMotion : Object.assign(Object.assign({}, initCollapseMotion(rootPrefixCls)), {\n    motionAppear: false\n  });\n  const newProps = Object.assign(Object.assign({}, props), {\n    checkable,\n    selectable,\n    showIcon,\n    motion,\n    blockNode,\n    showLine: Boolean(showLine),\n    dropIndicatorRender\n  });\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  const draggableConfig = React.useMemo(() => {\n    if (!draggable) {\n      return false;\n    }\n    let mergedDraggable = {};\n    switch (typeof draggable) {\n      case 'function':\n        mergedDraggable.nodeDraggable = draggable;\n        break;\n      case 'object':\n        mergedDraggable = Object.assign({}, draggable);\n        break;\n      default:\n        break;\n      // Do nothing\n    }\n\n    if (mergedDraggable.icon !== false) {\n      mergedDraggable.icon = mergedDraggable.icon || /*#__PURE__*/React.createElement(HolderOutlined, null);\n    }\n    return mergedDraggable;\n  }, [draggable]);\n  return wrapSSR( /*#__PURE__*/React.createElement(RcTree, Object.assign({\n    itemHeight: 20,\n    ref: ref,\n    virtual: virtual\n  }, newProps, {\n    prefixCls: prefixCls,\n    className: classNames({\n      [`${prefixCls}-icon-hide`]: !showIcon,\n      [`${prefixCls}-block-node`]: blockNode,\n      [`${prefixCls}-unselectable`]: !selectable,\n      [`${prefixCls}-rtl`]: direction === 'rtl'\n    }, className, hashId),\n    direction: direction,\n    checkable: checkable ? /*#__PURE__*/React.createElement(\"span\", {\n      className: `${prefixCls}-checkbox-inner`\n    }) : checkable,\n    selectable: selectable,\n    switcherIcon: nodeProps => renderSwitcherIcon(prefixCls, switcherIcon, showLine, nodeProps),\n    draggable: draggableConfig\n  }), children));\n});\nexport default Tree;"],"mappings":";;AAAA,OAAOA,cAAc,MAAM,2CAA2C;AACtE,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,MAAM,MAAM,SAAS;AAC5B,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,aAAa,QAAQ,oBAAoB;AAClD,OAAOC,kBAAkB,MAAM,iBAAiB;AAChD,OAAOC,mBAAmB,MAAM,uBAAuB;AACvD,OAAOC,kBAAkB,MAAM,kBAAkB;AACjD,OAAOC,QAAQ,MAAM,SAAS;AAC9B,IAAMC,IAAI,GAAG,aAAaN,KAAK,CAACO,UAAU,CAAC,UAACC,KAAK,EAAEC,GAAG,EAAK;EAAA;EACzD,wBAIIT,KAAK,CAACU,UAAU,CAACT,aAAa,CAAC;IAHjCU,YAAY,qBAAZA,YAAY;IACZC,SAAS,qBAATA,SAAS;IACTC,OAAO,qBAAPA,OAAO;EAET,IACaC,kBAAkB,GAW3BN,KAAK,CAXPO,SAAS;IACTC,SAAS,GAUPR,KAAK,CAVPQ,SAAS;IAAA,kBAUPR,KAAK,CATPS,QAAQ;IAARA,QAAQ,gCAAG,KAAK;IAChBC,QAAQ,GAQNV,KAAK,CARPU,QAAQ;IACRC,aAAY,GAOVX,KAAK,CAPPW,YAAY;IAAA,mBAOVX,KAAK,CANPY,SAAS;IAATA,SAAS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